﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using WebComponents.Data;
using WebComponents;

public partial class _Default : System.Web.UI.Page {
  protected void Page_Load(object sender, EventArgs e) {
    var list = ArticleController.GetByCateID(78, Global.CurrentCultureCode).Where(a => a.IsApproved == true && a.StatusID == 2).ToList();
    rptNews.DataSource = list;
    rptNews.DataBind();
    var list2 = ArticleController.GetByCateID(76, Global.CurrentCultureCode).Where(a => a.IsApproved == true && a.StatusID == 2).ToList();
    rptNews2.DataSource = list2;
    rptNews2.DataBind();
    Page.Title = "Nhan Publicite";
    var list3 = ArticleController.GetByCateID(80, Global.CurrentCultureCode).Where(a => a.IsApproved == true && a.OnlyForMembers == true).Skip(0).Take(1).ToList();
    rptArticle.DataSource = list3;
    rptArticle.DataBind();
    var list4 = ArticleController.GetByCateID(75, Global.CurrentCultureCode).Where(a => a.IsApproved == true && a.OnlyForMembers == true).Skip(0).Take(1).ToList();
    rptArticle2.DataSource = list4;
    rptArticle2.DataBind();
  }
}
